<template>
  <div>
    <el-pagination
      background
      :total="total"
      :page-size="pageSize"
      style="margin-top: 8px;"
      layout="total, sizes, prev, pager, next, jumper"
      @size-change="sizeChange"
      @current-change="currentChange"/>
  </div>
</template>

<script>
  export default {
    name: "PageIndex",
    props: {
      // 数据总条数
      total: {
        type: Number,
        default: 0
      },
      // 每页显示条数
      size: {
        type: Number,
        default: 10
      },
      // 当前页码
      sizeChange: {
        type: Function
      },
      // 分页条数
      currentChange: {
        type: Function
      },
      pageSize: {
        type: Number,
        default: 20
      }
    }
  }
</script>
